<?php

/**
 * AccountBank filter form base class.
 *
 * @package    erpcrm
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseAccountBankFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'contact_iden'     => new sfWidgetFormPropelChoice(array('model' => 'Contact', 'add_empty' => true)),
      'name'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'initials'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'branch'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'swift_code'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'street_address'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'city'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'country'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'zip_code'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'country_code'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'area_code'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'phone'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'fax'              => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'email'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'contact_person'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'contact_position' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'account_number'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'account_name'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'contact_iden'     => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Contact', 'column' => 'iden')),
      'name'             => new sfValidatorPass(array('required' => false)),
      'initials'         => new sfValidatorPass(array('required' => false)),
      'branch'           => new sfValidatorPass(array('required' => false)),
      'swift_code'       => new sfValidatorPass(array('required' => false)),
      'street_address'   => new sfValidatorPass(array('required' => false)),
      'city'             => new sfValidatorPass(array('required' => false)),
      'country'          => new sfValidatorPass(array('required' => false)),
      'zip_code'         => new sfValidatorPass(array('required' => false)),
      'country_code'     => new sfValidatorPass(array('required' => false)),
      'area_code'        => new sfValidatorPass(array('required' => false)),
      'phone'            => new sfValidatorPass(array('required' => false)),
      'fax'              => new sfValidatorPass(array('required' => false)),
      'email'            => new sfValidatorPass(array('required' => false)),
      'contact_person'   => new sfValidatorPass(array('required' => false)),
      'contact_position' => new sfValidatorPass(array('required' => false)),
      'account_number'   => new sfValidatorPass(array('required' => false)),
      'account_name'     => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('account_bank_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AccountBank';
  }

  public function getFields()
  {
    return array(
      'iden'             => 'Text',
      'contact_iden'     => 'ForeignKey',
      'name'             => 'Text',
      'initials'         => 'Text',
      'branch'           => 'Text',
      'swift_code'       => 'Text',
      'street_address'   => 'Text',
      'city'             => 'Text',
      'country'          => 'Text',
      'zip_code'         => 'Text',
      'country_code'     => 'Text',
      'area_code'        => 'Text',
      'phone'            => 'Text',
      'fax'              => 'Text',
      'email'            => 'Text',
      'contact_person'   => 'Text',
      'contact_position' => 'Text',
      'account_number'   => 'Text',
      'account_name'     => 'Text',
    );
  }
}
